﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace SPHelpCollectionBuilder
{
    public class ConfigManager
    {
        public static string HiveLocation
        {
            get
            {
                string result = string.Empty;
                //read from config file
                result = Convert.ToString(ConfigurationManager.AppSettings["12Hive"]);
                if (string.IsNullOrEmpty(result))
                {
                    //make it up
                    result = string.Concat(Environment.GetEnvironmentVariable("ProgramFiles"), "\\", @"Common Files\Microsoft Shared\web server extensions\12");
                }

                return result;
            }
        }
    }
}
